package com.txts.road.app.message.model.dto;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;

/**
 * 消息会话表单对象
 *
 * @author baoyr
 * @since 2025-07-17 10:45
 */
@Getter
@Setter
@Schema(description = "消息会话表单对象")
public class MessageSessionDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "会话ID")
    @NotNull(message = "会话ID不能为空")
    private Long id;

    @Schema(description = "用户ID")
    @NotNull(message = "用户ID不能为空")
    private Long userId;

    @Schema(description = "联系人用户ID")
    @NotNull(message = "联系人用户ID不能为空")
    private Long contactUserId;

    @Schema(description = "最后一条消息ID")
    private Long lastMessageId;

    @Schema(description = "最后消息时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastMessageTime;

    @Schema(description = "未读消息数")
    private Integer unreadCount;

    @Schema(description = "是否删除：0-否，1-是")
    private Integer isDeleted;

   


}
